export interface ObjectQueryResponse {
    RpcId: number;
    Error?: number;
    Message?: string;
    Entity: Uint8Array;
}

export interface ObjectQueryRequest {
    RpcId: number;
    Key: number;
    InstanceId: number;
}

export interface A2M_Reload {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface M2A_Reload {
    RpcId: number;
}

export interface G2G_LockResponse {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface G2G_LockRequest {
    RpcId: number;
    Id: number;
    Address: string;
}

export interface G2G_LockReleaseResponse {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface G2G_LockReleaseRequest {
    RpcId: number;
    Id: number;
    Address: string;
}

export interface ObjectAddResponse {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface ObjectAddRequest {
    RpcId: number;
    Key: number;
    InstanceId: number;
}

export interface ObjectLockResponse {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface ObjectLockRequest {
    RpcId: number;
    Key: number;
    InstanceId: number;
    Time: number;
}

export interface ObjectUnLockResponse {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface ObjectUnLockRequest {
    RpcId: number;
    Key: number;
    OldInstanceId: number;
    InstanceId: number;
}

export interface ObjectRemoveResponse {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface ObjectRemoveRequest {
    RpcId: number;
    Key: number;
}

export interface ObjectGetResponse {
    RpcId: number;
    Error?: number;
    Message?: string;
    InstanceId: number;
}

export interface ObjectGetRequest {
    RpcId: number;
    Key: number;
}

export interface G2R_GetLoginKey {
    RpcId: number;
    Error?: number;
    Message?: string;
    Key: number;
    GateId: number;
}

export interface R2G_GetLoginKey {
    RpcId: number;
    Account: string;
}

export interface G2M_SessionDisconnect {
    RpcId: number;
}

export interface M2M_UnitTransferResponse {
    RpcId: number;
    Error?: number;
    Message?: string;
    NewInstanceId?: number;
}

export interface M2M_UnitTransferRequest {
    RpcId: number;
    OldInstanceId: number;
    Unit: Uint8Array;
    Entitys: Uint8Array[];
}

export interface L2A_LoginAccountResponse {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface A2L_LoginAccountRequest {
    RpcId: number;
    AccountId: number;
}

export interface G2L_DisconnectGateUnit {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface L2G_DisconnectGateUnit {
    RpcId: number;
    AccountId: number;
}

export interface R2A_GetRealmKey {
    RpcId: number;
    Error?: number;
    Message?: string;
    RealmKey: string;
}

export interface A2R_GetRealmKey {
    RpcId: number;
    AccountId: number;
}

export interface G2R_GetLoginGateKey {
    RpcId: number;
    Error?: number;
    Message?: string;
    GateSessionKey: string;
}

export interface R2G_GetLoginGateKey {
    RpcId: number;
    AccountId: number;
}

export interface L2G_AddLoginRecord {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface G2L_AddLoginRecord {
    RpcId: number;
    AccountId: number;
    ServerId: number;
}

export interface M2G_RequestEnterGameState {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface G2M_RequestEnterGameState {
    RpcId: number;
}

export interface M2G_RequestExitGame {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface G2M_RequestExitGame {
    RpcId: number;
}

export interface L2G_RemoveLoginRecord {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface G2L_RemoveLoginRecord {
    RpcId: number;
    AccountId: number;
    ServerId: number;
}

export interface UnitCache2Other_AddOrUpdateUnit {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface Other2UnitCache_AddOrUpdateUnit {
    RpcId: number;
    UnitId: number;
    EntityTypes?: string[];
    EntityBytes?: Uint8Array[];
}

export interface UnitCache2Other_GetUnit {
    RpcId: number;
    Error?: number;
    Message?: string;
    EntityList?: Uint8Array[];
    ComponentNameList?: string[];
}

export interface Other2UnitCache_GetUnit {
    RpcId: number;
    UnitId: number;
    ComponentNameList?: string[];
}

export interface UnitCache2Other_DeleteUnit {
    RpcId: number;
    Error?: number;
    Message?: string;
}

export interface Other2UnitCache_DeleteUnit {
    RpcId: number;
    UnitId: number;
}
